﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using LiteDB;
using WpfApp1.Controls;
using WpfApp1.Models;
using WpfApp1.Views;

namespace WpfApp1;

public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();
        datas.ItemsSource = Enumerable.Range(0, 1000).ToArray();
    }

    public override void OnApplyTemplate()
    {
        base.OnApplyTemplate();
    }

    private void Button_Click(object sender, RoutedEventArgs e)
    {
    }

    private void ReactiveProperty_Click(object sender, RoutedEventArgs e)
    {
        Window win = new TestReactivePropertyView();
        win.Show();
    }

    private void GC_now_Click(object sender, RoutedEventArgs e)
    {
        GC.Collect();
    }

    private void ScrollViewer_ScrollChanged(object sender, ScrollChangedEventArgs e)
    {
    }

    private void DisplayScroll_Click_1(object sender, RoutedEventArgs e)
    {
    }

    private void BusyMessageBox_Click(object sender, RoutedEventArgs e)
    {
        var cancelSource = new CancellationTokenSource(TimeSpan.FromSeconds(3));

        var bwin = new BusyMessageBox();
        bwin.Show(cancelSource.Token, 7);
    }

    private void TestCavasItems_Click(object sender, RoutedEventArgs e)
    {
        var win = new TestCavasItems();
        win.ShowDialog();
    }

    private void TestGoneDragDrop_Click(object sender, RoutedEventArgs e)
    {
        var win = new TestGoneDragDropView();
        win.ShowDialog();
    }
}